package com.activiti.convert;

import com.activiti.model.ProcessInstanceInfo;
import lombok.Data;
import lombok.ToString;
import org.activiti.engine.runtime.ProcessInstance;
@Data
@ToString
public class ProcessInstanceInfoConverter implements CommonConverter<ProcessInstance, ProcessInstanceInfo> {
    @Override
    public ProcessInstanceInfo convert(ProcessInstance processInstance) {
        ProcessInstanceInfo processInstanceInfo = BaseConvert.convertObject(processInstance, ProcessInstanceInfo.class);
        processInstanceInfo.setProcessInstanceId(processInstance.getProcessInstanceId());
        return processInstanceInfo;
    }
}
